package mlz.a_set.a_hashset;

import java.util.HashSet;

public class HashSetDemo02 {
    public static void main(String[] args) {
        //唯一 key - value -> HashSet其实就是HashMap上的key = hashSer
        HashSet<User> u = new HashSet<>();
        u.add(new User("lucy",14));
        u.add(new User("tom",20));
        u.add(new User("lucy",14));
        u.add(new User("tom",20));
        u.add(new User("tom",14));
        u.add(new User("jack",30));
        System.out.println(u);

    }
}
